a = int(input())
k = 1
ans = 0
for i in range(1, a + 1):
    k = k * i
    ans = ans + k
print(ans)
